package com.masterclient.app.businessmodule.vipmodule.card;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import butterknife.ButterKnife;

/**
 * 卡片样式基类
 *
 * @param <T>
 */
public abstract class IBaseCard<T> extends RecyclerView.ViewHolder {
    protected Context mContext;
    protected RecyclerView.Adapter mAdapter;

    public IBaseCard(View itemView, Context context) {
        super(itemView);
        ButterKnife.bind(this, itemView);
        this.mContext = context;
    }

    public abstract void onBindViewHolder(T t, int i);

    public void onBindViewHolder(T t, RecyclerView.Adapter adapter, int i) {
        mAdapter = adapter;
        onBindViewHolder(t,i);
    }
}
